package tech.aistar.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import tech.aistar.service.IAgentService;
import tech.aistar.service.ILandlordService;
import tech.aistar.service.ITenantService;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/home")
public class HomeController {


    @RequestMapping("/page")
    public String Home(){

        return "/home_page/home";
    }

    @RequestMapping("/exit")
    public String Exit(HttpServletRequest request){
        request.getSession().invalidate();

        return "redirect:/login/check.action";
    }

    @RequestMapping("/home")
    public String toHome(){

        return "redirect:/home/page.action";
    }

    @RequestMapping("/WholeRent")
    public String WholeRent(){
        return "redirect:/House/Zheng.action";
    }

    @RequestMapping("/togetherRent")
    public String togetherRent(){
        return "redirect:/House/Hezu.action";
    }

    @RequestMapping("/student")
    public String student(){
        return "/rent/student";
    }

    @RequestMapping("/white")
    public String white(){
        return "/rent/white";
    }



}
